home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 21 / AACD 21.iso / AACD / Utilities / Ghostscript / src / gdevplnx.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-01-01  |  3.2 KB  |  76 lines

  1. /* Copyright (C) 1998 Aladdin Enterprises.  All rights reserved.
  2.   
  3.   This file is part of AFPL Ghostscript.
  4.   
  5.   AFPL Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author or
  6.   distributor accepts any responsibility for the consequences of using it, or
  7.   for whether it serves any particular purpose or works at all, unless he or
  8.   she says so in writing.  Refer to the Aladdin Free Public License (the
  9.   "License") for full details.
  10.   
  11.   Every copy of AFPL Ghostscript must include a copy of the License, normally
  12.   in a plain ASCII text file named PUBLIC.  The License grants you the right
  13.   to copy, modify and redistribute AFPL Ghostscript, but only under certain
  14.   conditions described in the License.  Among other things, the License
  15.   requires that the copyright notice and this notice be preserved on all
  16.   copies.
  17. */
  18.  
  19. /*$Id: gdevplnx.h,v 1.2 2000/09/19 19:00:20 lpd Exp $*/
  20. /* Definitions and API for plane extraction device */
  21. /* Requires gxdevcli.h */
  22.  
  23. #ifndef gdevplnx_INCLUDED
  24. #  define gdevplnx_INCLUDED
  25.  
  26. #include "gxrplane.h"
  27.  
  28. /*
  29.  * A plane-extraction device appears to its client to be a color-capable
  30.  * device, like its target; but it actually extracts a single color plane
  31.  * for rendering to yet another device, called the plane device (normally,
  32.  * but not necessarily, a memory device).  Clients must know the pixel
  33.  * representation in detail, since the plane is specified as a particular
  34.  * group of bits within the pixel.
  35.  *
  36.  * The original purpose of plane-extraction devices is for band list
  37.  * rendering for plane-oriented color printers.  Each per-plane rasterizing
  38.  * pass over the band list sends the output to a plane-extraction device for
  39.  * the plane being printed.  There is one special optimization to support
  40.  * this: on the theory that even bands containing output for multiple bands
  41.  * are likely to have many objects that only write white into that band, we
  42.  * remember whether any (non-white) marks have been made on the page so far,
  43.  * and if not, we simply skip any rendering operations that write white.
  44.  *
  45.  * The depth of the plane_extract device and its target are limited to 32
  46.  * bits; the depth of each plane is limited to 8 bits.  We could raise these
  47.  * without too much trouble if necessary, as long as each plane didn't
  48.  * exceed 32 bits.
  49.  */
  50.  
  51. typedef struct gx_device_plane_extract_s {
  52.     gx_device_forward_common;
  53.     /* The following are set by the client before opening the device. */
  54.     gx_device *plane_dev;        /* the drawing device for the plane */
  55.     gx_render_plane_t plane;
  56.     /* The following are set by open_device. */
  57.     gx_color_index plane_white;
  58.     uint plane_mask;
  59.     bool plane_dev_is_memory;
  60.     /* The following change dynamically. */
  61.     bool any_marks;
  62. } gx_device_plane_extract;
  63. extern_st(st_device_plane_extract);
  64. #define public_st_device_plane_extract()    /* in gdevplnx.c */\
  65.   gs_public_st_complex_only(st_device_plane_extract, gx_device_plane_extract,\
  66.     "gx_device_plane_extract", 0, device_plane_extract_enum_ptrs,\
  67.     device_plane_extract_reloc_ptrs, gx_device_finalize)
  68.  
  69. /* Initialize a plane extraction device. */
  70. int plane_device_init(P5(gx_device_plane_extract *edev, gx_device *target,
  71.              gx_device *plane_dev,
  72.              const gx_render_plane_t *render_plane,
  73.              bool clear));
  74.  
  75. #endif /* gdevplnx_INCLUDED */
  76.